package com.cqc.jdk8.Jlang.thread;

import java.text.DateFormat;
import java.util.Date;
import java.util.concurrent.TimeUnit;

public class DThread extends Thread {
    @Override
    public void run() {
        try {
            for (int i = 0; i < 100; i++) {
                System.out.println("DThread，" + DateFormat.getDateTimeInstance().format(new Date()));
                TimeUnit.SECONDS.sleep(1);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }
}